home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / LOC / PSTRCAT.C < prev    next >
Text File  |  1991-09-09  |  1KB  |  31 lines

  1. /************************************************************************/
  2. /* Name:  PStrCat Module Implementation                                    */
  3. /*                                                                        */
  4. /* Purpose:  Concatenate a Pascal source string to the end of a Pascal    */
  5. /*     target string.                                                    */
  6. /*                                                                        */
  7. /* Author:  Steve Nies                                                    */
  8. /*                                                                        */
  9. /* Date created: 28 April 89                                            */
  10. /*                                                                        */
  11. /* Disclaimer:  This software has been developed privately by the        */
  12. /*     Author and has been released into the Public Domain.  The        */
  13. /*     author makes no claims as to the correctness or suitability        */
  14. /*     of the software for the intended purpose.                        */
  15. /************************************************************************/
  16.  
  17. #include <Style.h>
  18.  
  19. void PStrCat ( register address target, register address source )
  20.  
  21. BEGIN
  22.   register string src = (string) source;
  23.   register string trgt = (string) target;
  24.   register int length = *src++;
  25.   register int offset = *trgt;
  26.   *trgt += length;
  27.   trgt += ++offset;
  28.   WHILE length-- LOOP
  29.     *trgt++ = *src++;
  30.   END_LOOP;
  31. END